<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>宽度自适应</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        div{
            height: 200px;
            background: yellow;
            padding-left: 100px;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>